package com.mxf.code;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试注册中心
 */
@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${config.info}")
    private String configInfo;

    @Autowired
    private TestProperties properties;

    @GetMapping("/config/info")
    @RefreshScope
    public String getConfigInfo() {
        return configInfo /*+ properties.getEnable()*/;
    }
}
